package com.flower8.dao;

import com.flower8.dto.ActiveCrowdfundDto;
import com.flower8.dto.ActiveOfferDto;
import com.flower8.model.CrowdfundPay;
import com.flower8.utils.PageData;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @Description: 众筹Dao
 * @Author: tanglin
 * @Date: 2019/09/19 15:32
 * @Version: 1.0
 */
@Repository
public interface CrowdfundDao {

    /**
     * 修改众筹单状态
     * @param pd
     * @throws Exception
     */
    void editCrowdfundStatus(PageData pd)throws Exception;

    /**
     * 添加用户信用分记录
     * @param pd
     * @throws Exception
     */
    void addCreditScore (PageData pd)throws Exception;

    /**
     * 查询所有用户众筹列表
     * @param pd
     * @return
     * @throws Exception
     */
    List<ActiveCrowdfundDto> getCrowdfundList(PageData pd)throws Exception;

    /**
     * 查询所有用户众筹列表数量
     * @param pd
     * @return
     * @throws Exception
     */
    int getCrowdfundListCount(PageData pd)throws Exception;

    /**
      * 查询众筹单筹款详情
      * @param pd
      * @return
      * @throws Exception
      */
    List<ActiveOfferDto> getCrowdfundDetailList(PageData pd)throws Exception;

    /**
     * 查询众筹单筹款详情数量
     * @param pd
     * @return
     * @throws Exception
     */
    int getCrowdfundDetailListCount(PageData pd)throws Exception;

    /**
     * 根据众筹单id查询
     * @param id
     * @return
     * @throws Exception
     */
    ActiveCrowdfundDto getCrowdfundById(Long id)throws Exception;

    /**
     * 修改众筹单
     * @param pd
     * @throws Exception
     */
    void updCrowd(PageData pd)throws Exception;

    /**
     * 打款记录查询列表
     * @param pd
     * @return
     * @throws Exception
     */
    List<CrowdfundPay> tranferMoneyList(PageData pd)throws Exception;

    /**
     * 打款记录查询列表数量
     * @param pd
     * @return
     * @throws Exception
     */
    int tranferMoneyCount(PageData pd)throws Exception;

    /**
     * 查询打款记录
     * @param pd
     * @return
     * @throws Exception
     */
    List<Map> tranferMoneyDetail(PageData pd)throws Exception;

    /**
     * 查询打款记录数量
     * @param pd
     * @return
     * @throws Exception
     */
    int tranferMoneyDetailCount(PageData pd)throws Exception;
}
